Skip to content

refactor: simplify group name normalization and cache returns - #50

Merged
henryiii merged 2 commits into
mainfrom
simplify-normalize-and-cache
Aug 6, 2026
Merged

refactor: simplify group name normalization and cache returns#50
henryiii merged 2 commits into
mainfrom
simplify-normalize-and-cache

Conversation

@henryiii

@henryiii henryiii commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Applies the "Simplifications" section of #45.

  • _normalize_group_names no longer builds a second normalized_to_original dict. After the duplicate check, the map is derivable from original_names (names[0]).
  • _parse_group and _resolve return a local tuple instead of assigning to the cache dict and reading it back.

No behavior change.


📚 Documentation preview 📚: https://dependency-groups--50.org.readthedocs.build/en/50/

Derive the normalized-to-original map from the collected original names
instead of building a second dict, and return the local tuple in
_parse_group/_resolve instead of reading it back from the cache.

Refs #45

Assisted-by: ClaudeCode:claude-fable-5
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@henryiii
henryiii force-pushed the simplify-normalize-and-cache branch from 5cc8a2b to 036a0a4 Compare August 5, 2026 23:55
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>

@sirosen sirosen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I misunderstood what the proposed simplification was earlier. This looks nice; cool!

@henryiii
henryiii merged commit 78e3a8a into main Aug 6, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants